package com.project.controller;

import com.project.bean.UserBean;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("user")
public class UserController {
    @RequestMapping("land")
    public String login( String username, String password, UserBean userBean){
        System.out.println(userBean);
        if ("张三".equals(username)&&"123456".equals(password)){
            return "登录成功";
        }else {
            return "登录失败";
        }
    }
    @RequestMapping(value = "add",method = RequestMethod.POST)
    public String add(UserBean userBean){
        System.out.println(userBean);
        return "ok";
    }
    @RequestMapping("del/{userId}")
    public String det(@PathVariable("userId") int id){
        return ""+id;
    }
    @RequestMapping("/update")
    public String update(int id){

        return "修改"+id;
    }
}
